package com.swt.gap.dao;

import com.github.pagehelper.Page;
import com.swt.gap.model.entity.TaskFile;
import com.swt.gap.model.vo.TaskFileVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TaskFileMapper {


//    int insertSelective(TaskFile record);

    int insert(TaskFile record);

    List<TaskFile> selectByTaskId(Integer taskId);

    int deleteTaskFile(@Param("fileId") Integer fileId, @Param("taskId") Integer taskId);

    /**
     * 数据源名称模糊搜索
     */
    Page<TaskFileVO> getTaskFileVOsByKeyword(@Param("taskId") Integer taskId, @Param("keyword")String keyword);

    int deleteByTaskId(Integer taskId);

    /**
    *  更新状态
    * @author sx
    * @date 2020/5/29 14:52
    */
    int updateStatus(@Param("fileId") Integer fileId, @Param("taskId") Integer taskId,
                     @Param("status")Integer status);

    int deleteByFileIds(@Param("fileIds") List<Integer> fileIds);

    int select(@Param("fileId") Integer fileId, @Param("taskId") Integer taskId);
}